<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>WISSC轮滑教培服务网-查询系统</title>
    <link rel="icon" href="${base}/favicon.ico">
<#assign base=request.contextPath  />
    <link rel="stylesheet" href="${base}/frame/layui/css/layui.css">
    <link rel="stylesheet" href="${base}/frame/static/css/style.css">
    <link rel="icon" href="${base}/frame/static/image/code.png">
    <script type="text/javascript" src="${base}/frame/layui/layui.js"></script>
    <script src="${base}/js/jquery/jquery-1.8.3.min.js" type="text/javascript"></script>
    <style type="text/css">
        .h2bcml{background-color: #F2F2F2;margin-left: 11%;padding:6px;}
    </style>

</head>
<body>
<div id="imgDIV" style="float: left;padding: 2%">

</div>
<div style="padding: 2%;" >
    <h3 class="h2bcml" style="font-size: 20px; ">机构名称:<span id="unitNameP" style="font-size: 20px; "></span></h3><br>
    <h3 class="h2bcml" style="font-size: 15px; ">机构简介:<span id="briefP" style="font-size: 15px;width: 100%"></span></h3>
</div>
<br><br>
<input hidden id="unitName" value="${unitName}">
<div class="layui-carousel" id="test1" style="margin: 0 2%;">
    <div carousel-item="" id="urlDIV" style="height:420px;width: 720px">

    </div>
</div>
<script type="text/javascript" src="${base}/frame/echarts/echarts.min.js"></script>
<script src="${base}/scrollBar/scrollBar.js" type="text/javascript"></script>
<script>
    layui.use('carousel', function () {
        var carousel = layui.carousel;
        $.ajax({
            url: "${base}/authorization/authorization_select",    //请求的url地址
            dataType: "json",   //返回格式为json
            data: {unitName: $("#unitName").val()},    //参数值
            type: "GET",   //请求方式
            //async:false,
            success: function (data) {
                $("#imgDIV").html(
                        '<img src="${base}/authorization/getPhoto?path=' + data[0].logoUrl + '" style="width: 120px;height: 120px;">'
                );
                $("#unitNameP").html(
                        data[0].unitName
                );
                $("#briefP").html(
                        data[0].brief
                );
                var htm = "";
                for (var i = 0; i < data.length; i++) {
                    htm += '<div ><img src="${base}/authorization/getPhoto?path=' + data[i].imagUrl + '" style="width:100%;height:100%;  " ></div>'
                }
                $("#urlDIV").html(htm);
                //建造实例
                carousel.render({
                    elem: '#test1'
                    , width: '720px' //设置容器宽度
                    ,height: '420px'
                    , arrow: 'always' //始终显示箭头
                    //,anim: 'updown' //切换动画方式
                });
            }
        });
    });
</script>
</body>
</html>